500
How can I filter items for dates before a specified date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Dates")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .T.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 1026/*exShowFocusItem+exNoItems*/
			oColumn:Filter := "to 12/27/2010"
			oColumn:FilterType := 4/*exDate*/
		oItems := oTree:Items()
			oItems:AddItem("12/27/2010")
			oItems:AddItem("12/28/2010")
			oItems:AddItem("12/29/2010")
			oItems:AddItem("12/30/2010")
			oItems:AddItem("12/31/2010")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
499
Is it possible to filter dates

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Dates")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .T.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 1026/*exShowFocusItem+exNoItems*/
		oItems := oTree:Items()
			oItems:AddItem("12/27/2010")
			oItems:AddItem("12/28/2010")
			oItems:AddItem("12/29/2010")
			oItems:AddItem("12/30/2010")
			oItems:AddItem("12/31/2010")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
498
Is it possible to change the Exclude field name to something different, in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SetProperty("Description",25/*exFilterBarExclude*/,"Leaving out")
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
497
How can I display the Exclude field in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
496
Is it possible to show and ensure the focused item from the control, in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 1280/*exShowFocusItem+exShowCheckBox*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("SelectItem",oItems:InsertItem(h,,"Child 2"),.T.)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
495
Is it possible to show only blanks items with no listed items from the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 16386/*exShowBlanks+exNoItems*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
494
How can I include the blanks items in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 16640/*exShowBlanks+exShowCheckBox*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
493
How can I select multiple items in the drop down filter window, using check-boxes

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 256/*exShowCheckBox*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
492
Is it possible to allow a single item being selected in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 128/*exSingleSel*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
491
How can I display no (All) item in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SetProperty("Description",0/*exFilterBarAll*/,"")
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .T.
			oColumn:FilterList := 2/*exNoItems*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
490
Is it possible to display no items in the drop down filter window, so only the pattern is visible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .T.
			oColumn:FilterList := 2/*exNoItems*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
489
How do I hide the selection

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oTree:SetProperty("SelForeColor",oTree:ForeColor())
		oTree:SetProperty("SelBackColor",oTree:BackColor())
		oTree:ShowFocusRect := .F.
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Format")
				oColumn:FormatColumn := "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			oItems:AddItem(10)
			oItems:AddItem(-8)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
488
How do I access the cells, or how do I get the values in the columns
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumns := oTree:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
		oItems := oTree:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellCaption",h,1,"SubItem 1.1")
			oItems:SetProperty("CellCaption",h,2,"SubItem 1.2")
			DevOut( Transform(oItems:CellCaption(h,0),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
487
Is it possible to load child items when clicking the +/- button

PROCEDURE OnBeforeExpandItem(oTree,Item,Cancel)
	LOCAL oItems
	oItems := oTree:Items()
		oItems:InsertItem(Item,,"new")
		oItems:SetProperty("ItemHasChildren",oItems:InsertItem(Item,,"new"),.T.)
		oItems:InsertItem(Item,,"new")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oTree,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/

		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("ItemHasChildren",oItems:AddItem("aka"),.T.)
			oItems:AddItem("next item")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
486
How can I change the check-boxes appearance

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(1,"XP:Button 3 12")
			oAppearance:Add(2,"XP:Button 3 11")
			oAppearance:Add(3,"XP:Button 3 10")
		oTree:SetProperty("CheckImage",0/*Unchecked*/,16777216)
		oTree:SetProperty("CheckImage",1/*Checked*/,33554432)
		oTree:SetProperty("CheckImage",2/*PartialChecked*/,50331648)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
485
How can I initiate the OLE Drag and Drop support

PROCEDURE OnOLEStartDrag(oTree,Data,AllowedEffects)
	/*Data.SetData("data to drag")*/
	AllowedEffects := 1
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oTree,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oTree:OLEDropMode := 1/*exOLEDropManual*/
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
484
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oConditionalFormat,oConditionalFormat1
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oConditionalFormat := oTree:ConditionalFormats():Add("1","K1")
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oConditionalFormat1 := oTree:ConditionalFormats():Add("1","K2")
			oConditionalFormat1:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat1:ApplyTo := 2/*0x2+*/
		oTree:MarkSearchColumn := .F.
		oTree:DrawGridLines := -2/*exRowLines*/
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
			oColumns:Add("Column 3")
		oItems := oTree:Items()
			oItems:AddItem()
			oItems:AddItem()
			oItems:AddItem()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
483
Is it possible to display empty strings for 0 values

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Currency"):FormatColumn := "dbl(value) ? currency(dbl(value)) : ``"
		oItems := oTree:Items()
			oItems:AddItem(1.23)
			oItems:AddItem(2.34)
			oItems:AddItem(0)
			oItems:AddItem(10000.99)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
482
Is it possible to display empty strings for 0 values

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Currency"):ComputedField := "%0 ? currency(%0) : ``"
		oItems := oTree:Items()
			oItems:AddItem(1.23)
			oItems:AddItem(2.34)
			oItems:AddItem(0)
			oItems:AddItem(10000.99)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
481
How can I get the list of items as they are displayed
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oTree:Columns():Add("Names")
		oItems := oTree:Items()
			oItems:AddItem("Mantel")
			oItems:AddItem("Mechanik")
			oItems:AddItem("Motor")
			oItems:AddItem("Murks")
			oItems:AddItem("Märchen")
			oItems:AddItem("Möhren")
			oItems:AddItem("Mühle")
		oTree:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oTree:EndUpdate()
		DevOut( Transform(oTree:GetItems(1),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
480
Is posible to reduce the size of the picture to be shown in the column's caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
		oTree:HeaderHeight := 48
		oTree:Columns():Add("DefaultSize"):HTMLCaption := "Default-Size <img>pic1</img> Picture"
		oTree:Columns():Add("CustomSize"):HTMLCaption := "Custom-Size <img>pic1:16</img> Picture"
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
479
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oConditionalFormat := oTree:ConditionalFormats():Add("1")
			oConditionalFormat:Bold := .T.
			oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oTree:Columns():Add("C1")
		oColumn := oTree:Columns():Add("C2")
			oColumn:HeaderBold := .T.
			oColumn:HTMLCaption := "<fgcolor=FF0000>C2"
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(10),1,11)
			oItems:SetProperty("CellCaption",oItems:AddItem(12),1,13)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
478
The item is not getting selected when clicking the cell's checkbox. What should I do

PROCEDURE OnCellStateChanged(oTree,Item,ColIndex)
	oTree:Items():SetProperty("SelectItem",Item,.T.)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oTree,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oTree:Columns():Add("Check"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oTree:Items()
			oItems:AddItem(0)
			oItems:AddItem(1)
			oItems:AddItem(2)
			oItems:AddItem(3)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
477
Is it possible to limit the height of the item while resizing

PROCEDURE OnAddItem(oTree,Item)
	oTree:Items():SetProperty("ItemMinHeight",Item,18)
	oTree:Items():SetProperty("ItemMaxHeight",Item,72)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddItem := {|Item| OnAddItem(oTree,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oTree:BeginUpdate()
		oTree:ItemsAllowSizing := -1/*exResizeItem*/
		oTree:ScrollBySingleLine := .F.
		oTree:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oTree:Columns():Add("Names")
		oItems := oTree:Items()
			oItems:AddItem("Mantel")
			oItems:AddItem("Mechanik")
			oItems:AddItem("Motor")
			oItems:AddItem("Murks")
			oItems:AddItem("Märchen")
			oItems:AddItem("Möhren")
			oItems:AddItem("Mühle")
		oTree:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
476
Is it possible to copy the hierarchy of the control using the GetItems method

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Def")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:PutItems(oTree:GetItems(-1))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
475
How can I show the child items with no identation

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := 5/*exGroupLinesOutside*/
		oTree:Indent := 12
		oTree:HasLines := 2/*exThinLine*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
474
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := 1/*exGroupLinesAtRoot*/
		oTree:Indent := 12
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
473
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := 5/*exGroupLinesOutside*/
		oTree:Indent := 12
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
472
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := 4/*exGroupLinesInsideLeaf*/
		oTree:Indent := 12
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
471
Is there other ways of showing the hierarchy lines (exGroupLinesInside)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := 3/*exGroupLinesInside*/
		oTree:Indent := 12
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
470
Is there other ways of showing the hierarchy lines (exGroupLines)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := 2/*exGroupLines*/
		oTree:Indent := 12
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(oItems:InsertItem(h,,"Child 2"),,"SubChild 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
469
Does your control supports multiple lines tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
		oTree:ToolTipDelay := 1
		oTree:Columns():Add("tootip"):ToolTip := "<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
468
How can I prevent highlighting the column from the cursor - point

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJgEgI=")
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,0x1000000)
		oTree:Columns():Add("S"):Width := 32
		oTree:Columns():Add("Level 1"):LevelKey := 1
		oTree:Columns():Add("Level 2"):LevelKey := 1
		oTree:Columns():Add("Level 3"):LevelKey := 1
		oTree:Columns():Add("E1"):Width := 32
		oTree:Columns():Add("E2"):Width := 32
		oTree:Columns():Add("E3"):Width := 32
		oTree:Columns():Add("E4"):Width := 32

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
467
Is there any option to show the tooltip programmatically

PROCEDURE OnMouseMove(oTree,Button,Shift,X,Y)
	oTree:ShowToolTip(Transform(oTree:ItemFromPoint(-1,-1,c,hit),""),"","8","8")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oTree,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oTree:BeginUpdate()
		oTree:Columns():Add("Def")
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
466
Is it possible to prevent changing the rows/items colors by selection

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SelBackMode := 1/*exTransparent*/
		oTree:Columns():Add("HTML"):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			oItems:AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.")
			oItems:SetProperty("SelectItem",oItems:AddItem("<font ;6>This</font> <b>is</b> another <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>."),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
465
Is it possible to specify the cell's value but still want to display some formatted text instead the value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oTree:Columns():Add("Value")
		oTree:Columns():Add("FormatCell")
		oItems := oTree:Items()
			h := oItems:AddItem(1)
			oItems:SetProperty("CellCaption",h,1,12)
			oItems:SetProperty("FormatCell",h,1,"currency(value)")
			h := oItems:AddItem("01/01/2001")
			oItems:SetProperty("CellCaption",h,1,"01/01/2001")
			oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("FormatCell",h,1,"longdate(value) replace '2001' with '<b>2001</b>'")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
464
How can I simulate displaying groups

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h,h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:HasLines := 0/*exNoLine*/
		oTree:ScrollBySingleLine := .T.
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Name")
			oColumns:Add("A")
			oColumns:Add("B")
			oColumns:Add("C")
		oItems := oTree:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLineAlignment",h,3/*DividerBoth*/)
			oItems:SetProperty("ItemHeight",h,24)
			oItems:SetProperty("SortableItem",h,.F.)
			h1 := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("CellCaption",h1,1,1)
			oItems:SetProperty("CellCaption",h1,2,2)
			oItems:SetProperty("CellCaption",h1,3,3)
			h1 := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellCaption",h1,1,4)
			oItems:SetProperty("CellCaption",h1,2,5)
			oItems:SetProperty("CellCaption",h1,3,6)
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLineAlignment",h,3/*DividerBoth*/)
			oItems:SetProperty("ItemHeight",h,24)
			oItems:SetProperty("SortableItem",h,.F.)
			h1 := oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("CellCaption",h1,1,1)
			oItems:SetProperty("CellCaption",h1,2,2)
			oItems:SetProperty("CellCaption",h1,3,3)
			h1 := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellCaption",h1,1,4)
			oItems:SetProperty("CellCaption",h1,2,5)
			oItems:SetProperty("CellCaption",h1,3,6)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
463
How can I collapse all items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",0,.F.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
462
How can I expand all items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",0,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
461
Can I use PNG images to display pictures in the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SetProperty("HTMLPicture","pic1","c:\exontrol\images\card.png")
		oTree:HeaderHeight := 48
		oTree:Columns():Add("ColumnName"):HTMLCaption := "<b>HTML</b> Column <img>pic1</img> Picture"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
460
Is it possible to move an item from a parent to another

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			oItems:AddItem("A")
			oItems:AddItem("B")
			oItems:InsertItem(oItems:AddItem("C"),"","D")
			oItems:SetParent(oItems:FindItem("D",0),oItems:FindItem("A",0))
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
459
How can I change the identation for an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			oItems:AddItem("A")
			oItems:AddItem("B")
			oItems:InsertItem(oItems:AddItem("C"),"","D")
			oItems:SetParent(oItems:FindItem("D",0),0)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
458
How can I filter programatically using more columns

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Car")
			oColumns:Add("Equipment")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag")
			oItems:SetProperty("CellCaption",oItems:AddItem("Toyota"),1,"Air Bag,Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Ford"),1,"Air condition")
			oItems:SetProperty("CellCaption",oItems:AddItem("Nissan"),1,"Air Bag,ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"Air Bag, ABS,ESP")
			oItems:SetProperty("CellCaption",oItems:AddItem("Mazda"),1,"ABS,ESP")
		oColumn := oTree:Columns:Item("Car")
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "Mazda"
		oColumn1 := oTree:Columns:Item("Equipment")
			oColumn1:FilterType := 3/*exPattern*/
			oColumn1:Filter := "*ABS*|*ESP*"
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
457
Is it possible to colour a particular column, I mean the cell's foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oConditionalFormat := oTree:ConditionalFormats():Add("1")
			oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem(4),1,5)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
456
Is it possible to colour a particular column for specified values

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oConditionalFormat := oTree:ConditionalFormats():Add("int(%1) in (3,4,5)")
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem(4),1,5)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
455
Is it possible to colour a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:MarkSearchColumn := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",4/*exCellBackColor*/,255)
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellCaption",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellCaption",oItems:AddItem(4),1,5)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
454
How do i get all the children items that are under a certain parent Item handle
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems,oItems1
	LOCAL oTree
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("P")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oItems1 := oTree:Items()
			hChild := oItems1:ItemChild(oItems1:FirstVisibleItem())
			DevOut( Transform(oItems1:CellCaption(hChild,0),"") )
			DevOut( Transform(oItems1:CellCaption(oItems1:NextSiblingItem(hChild),0),"") )
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
453
How can I get the caption of focused item
PROCEDURE OnSelectionChanged(oTree)
	LOCAL oItems
	oItems := oTree:Items()
		DevOut( "Handle" )
		DevOut( Transform(oItems:FocusItem(),"") )
		DevOut( "Caption" )
		DevOut( Transform(oItems:CellCaption(oItems:FocusItem(),0),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SelectionChanged := {|| OnSelectionChanged(oTree)} /*Fired after a new item has been selected.*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
452
How can I get the caption of selected item
PROCEDURE OnSelectionChanged(oTree)
	LOCAL oItems
	oItems := oTree:Items()
		DevOut( "Handle" )
		DevOut( Transform(oItems:SelectedItem(0),"") )
		DevOut( "Caption" )
		DevOut( Transform(oItems:CellCaption(oItems:SelectedItem(0),0),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SelectionChanged := {|| OnSelectionChanged(oTree)} /*Fired after a new item has been selected.*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Items")
		oItems := oTree:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
451
Can I display the cell's check box after the text

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumn := oTree:Columns():Add("Column")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,check")
		oItems := oTree:Items()
			oItems:SetProperty("CellHasCheckBox",oItems:AddItem("Caption 1"),0,.T.)
			oItems:SetProperty("CellHasCheckBox",oItems:AddItem("Caption 2"),0,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
450
Can I change the order of the parts in the cell, as checkbox after the text, and so on

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Column"):SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,check,icon,icons,picture")
		oItems := oTree:Items()
			h := oItems:AddItem("Text")
			oItems:SetProperty("CellImage",h,0,1)
			oItems:SetProperty("CellHasCheckBox",h,0,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
449
Can I have an image displayed after the text. Can I get that effect without using HTML content

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Column"):SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,icon,check,icons,picture")
		oItems := oTree:Items()
			h := oItems:AddItem("Text")
			oItems:SetProperty("CellImage",h,0,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
448
Does your control support RightToLeft property for RTL languages or right to left

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ScrollBars := 15/*exDisableBoth*/
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:RightToLeft := .T.
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
447
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ScrollBars := 15/*exDisableBoth*/
		oColumns := oTree:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumns:Add("C4")
			oColumns:Add("C5")
			oColumns:Add("C6")
			oColumns:Add("C7")
			oColumns:Add("C8")
		oTree:RightToLeft := .T.
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
446
How can I use the CASE statement (CASE usage)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Value"):Width := 24
		oColumn := oTree:Columns():Add("CASE - statment")
			oColumn:ComputedField := "%0 case (default:'not found';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen';14:'Fourtheen')"
			oColumn:ToolTip := oColumn:ComputedField()
		oItems := oTree:Items()
			oItems:AddItem(0)
			oItems:AddItem(1)
			oItems:AddItem(2)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
445
How can I use the CASE statement (CASE usage)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Value"):Width := 24
		oColumn := oTree:Columns():Add("CASE - statment")
			oColumn:ComputedField := "%0 case (default:'not found';1:'One';2:'Two';3:'Three';4:'Four';5:'Five';7:'Seven';8:'Eight';9:'Nine';11:'Eleven';13:'Thirtheen';14:'Fourtheen')"
			oColumn:ToolTip := oColumn:ComputedField()
		oItems := oTree:Items()
			oItems:AddItem(0)
			oItems:AddItem(1)
			oItems:AddItem(2)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
444
I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Value"):Width := 24
		oColumn := oTree:Columns():Add("SWITCH - statment")
			oColumn:ComputedField := "%0 switch ('not found', 1,2,3,4,5,7,8,9,11,13,14)"
			oColumn:ToolTip := oColumn:ComputedField()
		oItems := oTree:Items()
			oItems:AddItem(0)
			oItems:AddItem(1)
			oItems:AddItem(2)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
443
I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Value"):Width := 24
		oColumn := oTree:Columns():Add("IN - statment")
			oColumn:ComputedField := "%0 in (1,2,3,4,5,7,8,9,11,13,14) ? 'found' : ''"
			oColumn:ToolTip := oColumn:ComputedField()
		oItems := oTree:Items()
			oItems:AddItem(0)
			oItems:AddItem(1)
			oItems:AddItem(2)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
442
Is is possible to use HTML tags to display in the filter caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarCaption := "This is a bit of text being displayed in the filter bar."
		oTree:Columns():Add("")
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
441
How can I find the number of items after filtering
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("")
		oItems := oTree:Items()
			h := oItems:AddItem("")
			oItems:SetProperty("CellCaption",h,0,oItems:VisibleItemCount())
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
440
How can I change the filter caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 12801/*exFilterPromptWords+exFilterPromptContainsAll*/
		oTree:FilterBarPromptPattern := "london robert"
		oTree:FilterBarCaption := "<r>Found: ... "
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
439
While using the filter prompt is it is possible to use wild characters

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 16/*exFilterPromptPattern*/
		oTree:FilterBarPromptPattern := "lon* seat*"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
438
How can I list all items that contains any of specified words, not necessary at the beggining

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 4610/*exFilterPromptStartWords+exFilterPromptContainsAny*/
		oTree:FilterBarPromptPattern := "london davolio"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
437
How can I list all items that contains any of specified words, not strings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 12802/*exFilterPromptWords+exFilterPromptContainsAny*/
		oTree:FilterBarPromptPattern := "london nancy"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
436
How can I list all items that contains all specified words, not strings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 12801/*exFilterPromptWords+exFilterPromptContainsAll*/
		oTree:FilterBarPromptPattern := "london robert"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
435
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 258/*exFilterPromptCaseSensitive+exFilterPromptContainsAny*/
		oTree:FilterBarPromptPattern := "Anne"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
434
Is it possible to list only items that ends with any of specified strings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 4/*exFilterPromptEndWith*/
		oTree:FilterBarPromptColumns := "0"
		oTree:FilterBarPromptPattern := "Fuller"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
433
Is it possible to list only items that ends with any of specified strings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 4/*exFilterPromptEndWith*/
		oTree:FilterBarPromptColumns := "0"
		oTree:FilterBarPromptPattern := "Fuller"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
432
Is it possible to list only items that starts with any of specified strings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 3/*exFilterPromptStartWith*/
		oTree:FilterBarPromptColumns := "0"
		oTree:FilterBarPromptPattern := "An M"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
431
Is it possible to list only items that starts with specified string

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 3/*exFilterPromptStartWith*/
		oTree:FilterBarPromptColumns := "0"
		oTree:FilterBarPromptPattern := "A"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
430
How can I specify that the list should include any of the seqeunces in the pattern

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 2/*exFilterPromptContainsAny*/
		oTree:FilterBarPromptPattern := "london seattle"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
429
How can I specify that all sequences in the filter pattern must be included in the list

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 1/*exFilterPromptContainsAll*/
		oTree:FilterBarPromptPattern := "london manager"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
428
How do I change at runtime the filter prompt

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptPattern := "london manager"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
427
How do I specify to filter only a single column when using the filter prompt

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptColumns := "2,3"
		oTree:FilterBarPromptPattern := "london"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
426
How do I change the prompt or the caption being displayed in the filter bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPrompt := "changed"
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
425
How do I enable the filter prompt feature

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
424
I have an EBN file how can I apply different colors to it, so no need to create a new one

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:SetProperty("SelBackColor",oTree:BackColor())
		oTree:SetProperty("SelForeColor",oTree:ForeColor())
		oTree:HasLines := 0/*exNoLine*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			hC := oItems:InsertItem(h,,"Default")
			oItems:SetProperty("ItemBackColor",hC,0x1000000)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Light Green")
			oItems:SetProperty("ItemBackColor",hC,0x100ff00)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Dark Green")
			oItems:SetProperty("ItemBackColor",hC,0x1007f00)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Magenta")
			oItems:SetProperty("ItemBackColor",hC,0x1ff7fff)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			hC := oItems:InsertItem(h,,"Yellow")
			oItems:SetProperty("ItemBackColor",hC,0x17fffff)
			oItems:SetProperty("ItemHeight",oItems:InsertItem(h,,""),6)
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
423
How can I change the foreground color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",8/*exHeaderForeColor*/,8439039)
			oColumns:Add("Column 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
422
How can I change the background color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",7/*exHeaderBackColor*/,8439039)
			oColumns:Add("Column 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
421
How can I display the column using currency format and enlarge the font for certain values

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumn := oTree:Columns():Add("Currency")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
		oItems := oTree:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("9.94")
			oItems:AddItem("11.94")
			oItems:AddItem("1000")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
420
How can I highlight only parts of the cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumn := oTree:Columns():Add("")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
419
How can I get the number of occurrences of a specified string in the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("")
		oColumn := oTree:Columns():Add("occurrences")
			oColumn:ComputedField := "lower(%0) count 'o'"
			oColumn:FormatColumn := "'contains ' + value + ' of \'o\' chars'"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1 oooof the root")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
418
How can I display dates in my format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumn := oTree:Columns():Add("Date")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
		oItems := oTree:Items()
			oItems:AddItem("01/21/2001")
			oItems:AddItem("02/22/2002")
			oItems:AddItem("03/13/2003")
			oItems:AddItem("04/24/2004")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
417
How can I display dates in short format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date"):FormatColumn := "shortdate(value)"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001")
			oItems:AddItem("02/02/2002")
			oItems:AddItem("03/03/2003")
			oItems:AddItem("04/04/2004")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
416
How can I display dates in long format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date"):FormatColumn := "longdate(value)"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001")
			oItems:AddItem("02/02/2002")
			oItems:AddItem("03/03/2003")
			oItems:AddItem("04/04/2004")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
415
How can I display only the right part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("")
		oColumn := oTree:Columns():Add("Right")
			oColumn:ComputedField := "%0 right 2"
			oColumn:FormatColumn := "'" + CHR(34) + "' + value + '" + CHR(34) + "'"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"SChild 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
414
How can I display only the left part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("")
		oTree:Columns():Add("Left"):ComputedField := "%0 left 2"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"SChild 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
413
How can I display true or false instead 0 and -1

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Boolean"):FormatColumn := "value != 0 ? 'true' : 'false'"
		oItems := oTree:Items()
			oItems:AddItem(.T.)
			oItems:AddItem(.F.)
			oItems:AddItem(.T.)
			oItems:AddItem(0)
			oItems:AddItem(1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
412
How can I display icons or images instead numbers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oTree:Columns():Add("Icons")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "'The cell displays the icon <img>'+value+'</img> instead ' + value"
		oItems := oTree:Items()
			oItems:AddItem(1)
			oItems:AddItem(2)
			oItems:AddItem(3)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
411
How can I display the column using currency

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Currency"):FormatColumn := "currency(dbl(value))"
		oItems := oTree:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("0")
			oItems:AddItem(5)
			oItems:AddItem("10000.99")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
410
How can I display the currency only for not empty cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Currency"):ComputedField := "len(%0) ? currency(dbl(%0)) : ''"
		oItems := oTree:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("0")
			oItems:SetProperty("ItemBackColor",oItems:AddItem(),AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
			oItems:AddItem("10000.99")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
409
Is there a function to display the number of days between two date including the number of hours

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Start"):Width := 32
		oTree:Columns():Add("End")
		oTree:Columns():Add("Duration"):ComputedField := "2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '' : str(=:1) + ' day(s)') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? ' and ' : '') + =:3 + ' hour(s)' : '' )"
		oItems := oTree:Items()
			h := oItems:AddItem("01/11/2001")
			oItems:SetProperty("CellCaption",h,1,"01/14/2001")
			h := oItems:AddItem("02/22/2002 12:00:00")
			oItems:SetProperty("CellCaption",h,1,"03/14/2002 13:00:00")
			h := oItems:AddItem("03/13/2003")
			oItems:SetProperty("CellCaption",h,1,"04/11/2003 11:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
408
Is there a function to display the number of days between two date including the number of hours

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Start")
		oTree:Columns():Add("End")
		oTree:Columns():Add("Duration"):ComputedField := "" + CHR(34) + "D " + CHR(34) + " + int(date(%1)-date(%0)) + " + CHR(34) + " H " + CHR(34) + " + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))"
		oItems := oTree:Items()
			h := oItems:AddItem("01/11/2001")
			oItems:SetProperty("CellCaption",h,1,"01/14/2001 23:00:00")
			h := oItems:AddItem("02/22/2002 12:00:00")
			oItems:SetProperty("CellCaption",h,1,"03/14/2002 13:00:00")
			h := oItems:AddItem("03/13/2003")
			oItems:SetProperty("CellCaption",h,1,"04/11/2003 11:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
407
How can I display the number of days between two dates

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Start")
		oTree:Columns():Add("End")
		oTree:Columns():Add("Duration"):ComputedField := "(date(%1)-date(%0)) + ' days'"
		oItems := oTree:Items()
			h := oItems:AddItem("01/11/2001")
			oItems:SetProperty("CellCaption",h,1,"01/14/2001")
			h := oItems:AddItem("02/22/2002")
			oItems:SetProperty("CellCaption",h,1,"03/14/2002")
			h := oItems:AddItem("03/13/2003")
			oItems:SetProperty("CellCaption",h,1,"04/11/2003")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
406
How can I get second part of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("Second"):ComputedField := "sec(date(%0))"
		oItems := oTree:Items()
			oItems:AddItem("01/11/2001 10:10:00")
			oItems:AddItem("02/22/2002 11:01:22")
			oItems:AddItem("03/13/2003 12:23:01")
			oItems:AddItem("04/14/2004 13:11:59")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
405
How can I get minute part of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("Minute"):ComputedField := "min(date(%0))"
		oItems := oTree:Items()
			oItems:AddItem("01/11/2001 10:10:00")
			oItems:AddItem("02/22/2002 11:01:00")
			oItems:AddItem("03/13/2003 12:23:00")
			oItems:AddItem("04/14/2004 13:11:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
404
How can I check the hour part only so I know it was afternoon

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ConditionalFormats():Add("hour(%0)>=12"):Bold := .T.
		oTree:Columns():Add("Date")
		oTree:Columns():Add("Hour"):ComputedField := "hour(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
403
What about a function to get the day in the week, or days since Sunday

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("WeekDay"):ComputedField := "weekday(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
402
Is there any function to get the day of the year or number of days since January 1st

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("Day since January 1st"):ComputedField := "yearday(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
401
How can I display only the day of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("Day"):ComputedField := "day(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/11/2001 10:00:00")
			oItems:AddItem("02/22/2002 11:00:00")
			oItems:AddItem("03/13/2003 12:00:00")
			oItems:AddItem("04/14/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN